allow access to router info and about page without authentication
authorFelix Fietkau <[email protected]>
Sat, 24 Sep 2005 17:32:51 +0000 (17:32 +0000)
committerFelix Fietkau <[email protected]>
Sat, 24 Sep 2005 17:32:51 +0000 (17:32 +0000)
SVN-Revision: 1989

openwrt/package/webif/files/usr/lib/webif/webif.sh

index 4c103c64d985fd4668acd8b59ebcccc600623e9a..bb054867be086f280f1eed875a34710b5bb99880 100644 (file)
@@ -79,7 +79,9 @@ EOF
                <div class="noBorderOnLeft">
                $HEAD
 EOF
-       [ -z "$REMOTE_USER" ] && {
+       [ -z "$REMOTE_USER" \
+         -a "${SCRIPT_NAME#/cgi-bin/webif/}" != "info.sh"\
+         -a "${SCRIPT_NAME#/cgi-bin/webif/}" != "about.sh" ] && {
                [ -z $FORM_passwd1 ] || {
                        echo '<pre>'
                        (
@@ -143,6 +145,8 @@ apply_passwd() {
                busybox)
                        echo -n '/:' > /etc/httpd.conf
                        cat /etc/passwd | grep root | cut -d: -f1,2 >> /etc/httpd.conf
+                       echo '/cgi-bin/webif/info.sh:*' >> /etc/httpd.conf
+                       echo '/cgi-bin/webif/about.sh:*' >> /etc/httpd.conf
                        killall -HUP httpd
                        ;;
        esac